package com.mc.lp.database.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.mc.lp.database.entity.type.ContactType;

@Entity
@Table(name="CONTACT")
public class ContactEntity extends MicroCampusBaseEntity {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Column(name="CONTACT_TYPE_ID")
	private ContactType contactTypeId;
	
	@Override
	public String toString() {
		return contactValue;
	}

	@Column(name="CONTACT_VALUE")
	private String contactValue;
	
	@ManyToOne(fetch=FetchType.EAGER)
	@JoinColumn(name="ENTITY_ID")
	MicroCampusEntity entity;

	public ContactType getContactTypeId() {
		return contactTypeId;
	}

	public void setContactTypeId(ContactType contactTypeId) {
		this.contactTypeId = contactTypeId;
	}

	public String getContactValue() {
		return contactValue;
	}

	public void setContactValue(String contactValue) {
		this.contactValue = contactValue;
	}

	public MicroCampusEntity getEntity() {
		return entity;
	}

	public void setEntity(MicroCampusEntity entity) {
		this.entity = entity;
	}

	
	
	
}
